<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="949.27">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #af0005}
span.s1 {color: #0000b1}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><b>FMHEncode2<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>Second Order Ambisonic encoder</b></p>
<p class="p2"><br></p>
<p class="p3"><b>FMHEncode2.ar(in, point_x, point_y, elevation, gain, wComp)</b></p>
<p class="p2"><br></p>
<p class="p3"><b>in</b> - input signal</p>
<p class="p3"><b>point_x </b>- a point in the x axis</p>
<p class="p3"><b>point_y </b>- a point in the y axis</p>
<p class="p3"><b>elevation</b> -<span class="Apple-converted-space">  </span>in radians, -0.5pi to +0.5pi</p>
<p class="p3"><b>gain</b> - a control rate level input.</p>
<p class="p3"><b>wComp</b> - chooses how the W channels is scaled. If 0, a scaler of 0.707 is used. If 1, W is varied according to the scaling of the X, Y, Z, R, S, T, U, and V channels. 1 is the default.</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p3">x, y positions-</p>
<p class="p3"><span class="Apple-tab-span">	</span>0 -1 behind</p>
<p class="p3"><span class="Apple-tab-span">	</span>0 1 in front<span class="Apple-converted-space"> </span></p>
<p class="p3"><span class="Apple-tab-span">	</span>-1 0 right</p>
<p class="p3"><span class="Apple-tab-span">	</span>1 0 left</p>
<p class="p2"><br></p>
<p class="p3">Output channels are in order W,X,Y,Z, R, S, T, U, V.</p>
<p class="p3">Because of the way the W component is scaled, it is recommended that you only decode with FMHDecode1 and it's methods.</p>
<p class="p2"><br></p>
<p class="p4">s=<span class="s1">Server</span>.internal.boot;</p>
<p class="p5">// You'll only hear the first two channels on a stereo setup.</p>
<p class="p4">(</p>
<p class="p4">{<span class="Apple-converted-space"> </span></p>
<p class="p4"><span class="Apple-tab-span">	</span><span class="s1">var</span> w, x, y, z, r, s, t, u, v;</p>
<p class="p4"><span class="Apple-tab-span">	</span>#w, x, y, z, r, s, t, u, v = <span class="s1">FMHEncode2</span>.ar(<span class="s1">WhiteNoise</span>.ar,<span class="s1">MouseX</span>.kr(-1, 1),<span class="Apple-converted-space"> </span></p>
<p class="p4"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="s1">MouseY</span>.kr(-1.0, 1.0), 0);</p>
<p class="p4">}.scope(9));</p>
</body>
</html>
